@echo off
echo ========================================
echo Icon Verification Script
echo ========================================

cd /d "%~dp0\.."

if not exist "dist\filehive-embedded-windows-amd64.exe" (
    echo Error: filehive-embedded-windows-amd64.exe not found
    echo Please run build-with-icon.bat first
    pause
    exit /b 1
)

echo Checking for embedded icons in Windows executables...
echo.

:: 使用PowerShell脚本来检查图标
echo Checking filehive-embedded-windows-amd64.exe...
powershell -ExecutionPolicy Bypass -File scripts\test-icon.ps1 -ExePath "dist\filehive-embedded-windows-amd64.exe"

echo.
echo Checking filehive-embedded-windows-386.exe...
powershell -ExecutionPolicy Bypass -File scripts\test-icon.ps1 -ExePath "dist\filehive-embedded-windows-386.exe"

echo.
echo File sizes:
dir dist\*.exe | findstr "exe"

echo.
echo Icon source files:
if exist "assets\app.ico" (
    echo OK: assets\app.ico exists
) else (
    echo WARNING: assets\app.ico not found
)

if exist "assets\app.png" (
    echo OK: assets\app.png exists
) else (
    echo WARNING: assets\app.png not found
)

if exist "rsrc.syso" (
    echo OK: rsrc.syso resource file exists
) else (
    echo WARNING: rsrc.syso resource file not found
)

echo.
echo Visual verification:
echo 1. Open File Explorer
echo 2. Navigate to the dist folder
echo 3. Check if the .exe files show your custom icon
echo 4. Right-click on the .exe file and select Properties
echo 5. The custom icon should appear in the Properties dialog

pause 